import { Length,IsInt, IsEmail, IsAlphanumeric,IsMobilePhone,IsEmpty } from 'class-validator';

export class UserRegisterModel {
	@Length(10, 20,{
		message: "用户名必须10至20位"
	})

	@IsAlphanumeric({
		message: "用户名必须是数字和字母组合"
	})
	username: string;

	@IsMobilePhone('zh-CN',{
		message: "手机号格式不正确"
	})
	userphone: string;

	@IsEmail({},{
		message: "邮箱格式不正确"
	})
	useremail: string;

	@Length(6,20, {
		message: "密码至少6至20位"
	})
	userpassword: string;
}